package com.bhs.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ResponseData implements Serializable {
    private static final long serialVersionUID = 211491550216567978L;
    private Integer status;
    private String msg;
    private Object data;
    public static ResponseData fault(){
        return new ResponseData(500,"操作失败",null);
    }
    public static ResponseData success(String msg,Object data){
        return new ResponseData(200,msg,data);
    }
    public static ResponseData success(Object data){
        return new ResponseData(200,"操作成功",data);
    }
    public static ResponseData success(){
        return new ResponseData(200,"操作成功",null);
    }
    public static ResponseData success(Integer status,String msg,Object data){
        return new ResponseData(status,msg,data);
    }

}
